home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
drvtypes.zip
/
DRVTYPES.C
next >
Wrap
Text File
|
1988-03-03
|
1KB
|
37 lines
/* Compiled with Turbo-C V-1.5 */
#include <stdio.h>
#include <dos.h>
main() {
int segm = 0xf000;
unsigned baseoff = 0xe401;
int cyl;
char heads;
int precom;
char cntrl;
int land;
char sect;
int i;
long cap;
printf("Drive Cylind. Heads Write Control Landing Sectors Format.\n");
printf("type precomp. byte zone per track. capac.\n");
for(i=0;i<47;i++) {
cyl = peek(segm, baseoff+(unsigned)(i*16));
heads = peekb(segm, baseoff+(unsigned)(i*16+2));
precom = peek(segm, baseoff+(unsigned)(i*16+5));
cntrl = peekb(segm,baseoff+(unsigned)(i*16+8));
land = peek(segm, baseoff+(unsigned)(i*16+12));
sect = peekb(segm, baseoff+(unsigned)(i*16+14));
cap = (long)(sect*512)*(long)(heads*cyl);
cap /= 1000000L;
if(precom != -1)
printf("%3d %7d %7d %9d %7d %8d %10d %8dMb\n",i+1,cyl,
(int)heads,precom,cntrl,land,(int)sect,(int)cap);
else
printf("%3d %7d %7d %9s %7d %8d %10d %8dMb\n",i+1,cyl,
(int)heads,"none",cntrl,land,(int)sect,(int)cap);
}
}